package com.changli06._abstract.exer2;

public class HourlyEmployee extends Employee {
    private double wage;
    private double hours;

    public HourlyEmployee(double wage, double hours) {
        this.wage = wage;
        this.hours = hours;
    }

    public HourlyEmployee(String name, int number, MyDate birthday, double wage, double hours) {
        super(name, number, birthday);
        this.wage = wage;
        this.hours = hours;
    }

    public double earnings(){
        return hours * wage;
    }
    @Override
    public String toString() {
        return "HourlyEmployee"+super.toString();

    }
}
